#!/data/data/com.termux/files/usr/bin/bash

echo Hello world!

### ver 0.1
### This is Uninstall Script.
### 这是卸载脚本
sleep 1

clear
echo "仅适用于Termux环境"
echo "仅在SDM710上测试通过过~~"
read -p "确定要删除 tshock + mono 吗？按任意键继续 按ctrl+c退出"
if [  "~/.TshockDeploydFiles" ]; then
    echo "检测到您尚未运行过安装脚本，是否继续卸载？？"
    read -p "按回车键继续,按ctrl + c 退出 "
fi

rm -rf ~/local
rm -rf ~/tshock_server
rm -rf ~/storage/shared/Tshock/

echo "好的，卸载完成。"

read -p "要删除下载的压缩包吗？输入y继续，输入n退出" xuanze

if [ $xuanze == "y" ];then
    rm -rf ~/storage/downloads/mono-termux.6.12.0.122-arm64-android24.tar.xz
    rm -rf ~/storage/downloads/TShock4.5.17_Terraria_1.4.3.6.zip
    echo "嗯，删掉了"
elif [ $xuanze == "n" ];then
    echo "哦。不删除"
    exit
    return 0
fi
    echo "哦。不删除"
    exit
    return 0

